/*
 * File Name     : @(#)IBroadcastingAgent.java
 * Creation Date : Mar 2, 2009
 * Author        : anirudh
 * 
 * Copyright 2009 Anirudh Vyas
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package hcis.core.engine.event.broadcast.agent;

import hcis.core.engine.event.IEvent;
import hcis.dto.IDTO;
import hcis.model.IModel;
import hcis.model.annotation.HCISEntity;

import java.io.Serializable;

/**
 * Core event broad casting agent that sets events in motion. In core engine context it adds the events to a phase queue so that they may be processed by appropriate listener.
 * 
 * @author avyas
 */
@HCISEntity
public interface IBroadcastingAgent /* FIXME : Update with lifecycle methods! extends IHCISLifecycle */{

	/**
	 * Broadcasts an event. Simply put a broadcast queues an event and places it in a place holder.
	 * 
	 * @param pEvent
	 *            event to be broadcasted.
	 * @see hcis.core.engine.phase.context.config.impl.PhaseEventContextConfig
	 */
	public abstract void broadcast(final IEvent<? extends IDTO<? extends IModel<?>, ?>, ? extends IModel<?>, ? extends Serializable> pEvent);
}
